<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <script src="plugins/js/vis.js" type="text/javascript"></script>
    <script src="plugins/common/common-js.js" type="text/javascript"></script>
    <link href="plugins/css/vis-network.min.css" rel="stylesheet" type="text/css" />
    <script src="plugins/js/jquery-3.4.1.min.js" type="text/javascript"></script>
</head>

<body>
    <div id="app" v-cloak>
        <el-row>
            <el-form id="userForm" ref="login" :model="userData" label-width="80px">
                <el-form-item label="用户名">
                    <el-input v-model="userData.username" name="username"></el-input>
                </el-form-item>
                <el-form-item label="密码">
                    <el-input v-model="userData.password" name="password"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="sumbit" @click="login">登录</el-button>
                    <el-button type="primary" @click="registNewdialog">注册仅测试用</el-button>
                </el-form-item>
            </el-form>
            <el-dialog title="注册" :visible.sync="registDialogVisible" width="30%">
                <el-row>
                    <el-form id="userForm" ref="regist" :model="userData" label-width="80px">
                    <el-form-item label="用户名">
                        <el-input v-model="userData.username" name="username"></el-input>
                    </el-form-item>
                    <el-form-item label="密码">
                        <el-input v-model="userData.password" name="password"></el-input>
                    </el-form-item>
                    <el-form-item label="姓名">
                        <el-input v-model="userData.name" name="name"></el-input>
                    </el-form-item>
                    <el-form-item label="权限">
                        <el-select v-model="userData.quanxian" placeholder="选择权限">
                            <el-option v-for="item in quanxian" :key="item.value"
                                :label="item.label" :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>
                    </el-form>
                </el-row>

                

                <span slot="footer" class="dialog-footer">
                    <el-button @click="registDialogVisible = false">取 消</el-button>
                    <el-button type="primary" @click="regist">确 定</el-button>
                </span>
            </el-dialog>
        </el-row>
    </div>

    <script src="js/Login.js" type="text/javascript"></script>
</body>

</html>